﻿Imports OMANE.Common.Model.Interfaces
Imports OMANE.Common.Model.Parametrage
Imports Actuariat
Imports PTIC_Util

Public Class AdapteMoteurEcheancier
    Implements IMoteur_Echeancier

    Private m_MoteurEcheancierV2 As IV2MoteurEcheancier

#Region "Création d'une instance"
    Public Sub New(ByVal nom As String, _
               ByVal coll_Param As ParametresList)
        Recalcul = TypeRecalcul.SurOrdre
        SetEtatCalcul(ValueEtatCalcul.A_MAJ)
        Initialize()
    End Sub
    Private Sub Initialize()
        'Création des Inputs du moteur de calcul de l'échéancier
        Dim Inuput As New InputMoteurEcheancier( _
            DureePretMois:=120, _
            AgeAssureSouscription:=40, _
            TableMortalite:=New TableMortaliteH_EmprunteursNA, _
            TableMaintienINCAPINVAL:=New TableMaintienINCAPINVAL_CNP,
            CapitalInitialPret:=10000, _
            TxNominalPretMens:=Mensualise_tx(0.0434, TypeMensualisation.TauxProportionel), _
            NbInitAssures:=1000, _
            TxRembAntiMens:=Mensualise_tx(0.05, TypeMensualisation.TauxProportionel), _
            TxEntreeINCINV:=0.005, _
            TxTaxeINCINV:=0.09, _
            TxFG:=0.075, _
            TxTechMens:=Mensualise_tx(0.02, TypeMensualisation.TauxEquivalent), _
            TarifDCMens:=Mensualise_tx(0.003, TypeMensualisation.TauxProportionel), _
            TarifINCINVMens:=Mensualise_tx(0.00149, TypeMensualisation.TauxProportionel), _
            AgeFinINCINV:=65, _
            AgeFinDC:=75, _
            TxComPartenaire:=0.385, _
            AbtMNO:=0.2, _
            AbtPerteRev:=0.3, _
            MajSinDC:=0.12, _
            MajSinINCINV:=0.045, _
            SelectionMedicale:=New ParametreSelectionMedicale(nomSel_medic, "Sélection médicale", New Boolean() {False, True}))

        'Création du moteur de calcul de l'échéancier
        m_MoteurEcheancierV2 = New MoteurEcheancier(Inuput)

        'Calcul de l'échéancier
        calculScenarioCentral()

        'Ajout des Handler sur le moteur de calcul
        AddHandler m_MoteurEcheancierV2.Input.AbtMNOChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.AbtPerteRevChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.AgeFinDCChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.AgeFinINCINVChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.AgeInitChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.CapIniChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.LongueurProjChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.MajSinDCChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.MajSinINCINVChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.NbInitAssuresChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.SelectionMedicaleChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TableMaintienINCAPINVALChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TableMortChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TarifDCMensChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TarifINCINVMensChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxComPartenaireChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxEntreeINCINVChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxFGChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxNomMensChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxRembAntiMensChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxTaxeINCINVChanged, AddressOf Input_Changed
        AddHandler m_MoteurEcheancierV2.Input.TxTechMensChanged, AddressOf Input_Changed
    End Sub
#End Region

#Region "Inputs"
    Public ReadOnly Property Input As Interfaces.IInputMoteurEcheancier Implements Interfaces.IMoteur_Echeancier.Input
        Get
            Return m_MoteurEcheancierV2.Input
        End Get
    End Property

#Region "Ancienne version"
    Public Property AbtMNO As Double Implements Interfaces.IMoteur_Echeancier.AbtMNO
        Get
            Return m_MoteurEcheancierV2.Input.AbtMNO
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.AbtMNO = value
        End Set
    End Property
    Public Event AbtMNOChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AbtMNOChanged
    Public Event AbtMNOChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AbtMNOChanging

    Public Property AbtPerteRev As Double Implements Interfaces.IMoteur_Echeancier.AbtPerteRev
        Get
            Return m_MoteurEcheancierV2.Input.AbtPerteRev
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.AbtPerteRev = value
        End Set
    End Property
    Public Event AbtPerteRevChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AbtPerteRevChanged
    Public Event AbtPerteRevChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AbtPerteRevChanging

    Public Property AgeFinDC As Double Implements Interfaces.IMoteur_Echeancier.AgeFinDC
        Get
            Return m_MoteurEcheancierV2.Input.AgeFinDC
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.AgeFinDC = value
        End Set
    End Property
    Public Event AgeFinDCChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AgeFinDCChanged
    Public Event AgeFinDCChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AgeFinDCChanging

    Public Property AgeFinINCINV As Double Implements Interfaces.IMoteur_Echeancier.AgeFinINCINV
        Get
            Return m_MoteurEcheancierV2.Input.AgeFinINCINV
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.AgeFinINCINV = value
        End Set
    End Property
    Public Event AgeFinINCINVChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AgeFinINCINVChanged
    Public Event AgeFinINCINVChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AgeFinINCINVChanging

    Public Property AgeInit As Double Implements Interfaces.IMoteur_Echeancier.AgeInit
        Get
            Return m_MoteurEcheancierV2.Input.AgeInit
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.AgeInit = value
        End Set
    End Property
    Public Event AgeInitChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AgeInitChanged
    Public Event AgeInitChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.AgeInitChanging

    Public Property CapIni As Double Implements Interfaces.IMoteur_Echeancier.CapIni
        Get
            Return m_MoteurEcheancierV2.Input.CapIni
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.CapIni = value
        End Set
    End Property
    Public Event CapIniChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.CapIniChanged
    Public Event CapIniChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.CapIniChanging

    Public Property LongueurProj As Integer Implements Interfaces.IMoteur_Echeancier.LongueurProj
        Get
            Return m_MoteurEcheancierV2.Input.LongueurProj
        End Get
        Set(ByVal value As Integer)
            m_MoteurEcheancierV2.Input.LongueurProj = value
        End Set
    End Property
    Public Event LongueurProjChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Integer)) Implements Interfaces.IMoteur_Echeancier.LongueurProjChanged
    Public Event LongueurProjChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Integer)) Implements Interfaces.IMoteur_Echeancier.LongueurProjChanging

    Public Property MajSinDC As Double Implements Interfaces.IMoteur_Echeancier.MajSinDC
        Get
            Return m_MoteurEcheancierV2.Input.MajSinDC
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.MajSinDC = value
        End Set
    End Property
    Public Event MajSinDCChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.MajSinDCChanged
    Public Event MajSinDCChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.MajSinDCChanging

    Public Property MajSinINCINV As Double Implements Interfaces.IMoteur_Echeancier.MajSinINCINV
        Get
            Return m_MoteurEcheancierV2.Input.MajSinINCINV
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.MajSinINCINV = value
        End Set
    End Property
    Public Event MajSinINCINVChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.MajSinINCINVChanged
    Public Event MajSinINCINVChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.MajSinINCINVChanging

    Public Property NbInitAssures As Double Implements Interfaces.IMoteur_Echeancier.NbInitAssures
        Get
            Return m_MoteurEcheancierV2.Input.NbInitAssures
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.NbInitAssures = value
        End Set
    End Property
    Public Event NbInitAssuresChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.NbInitAssuresChanged
    Public Event NbInitAssuresChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.NbInitAssuresChanging

    Public Property SelectionMedicale As ParametreSelectionMedicale Implements Interfaces.IMoteur_Echeancier.SelectionMedicale
        Get
            Return m_MoteurEcheancierV2.Input.SelectionMedicale
        End Get
        Set(ByVal value As ParametreSelectionMedicale)
            m_MoteurEcheancierV2.Input.SelectionMedicale = value
        End Set
    End Property
    Public Event SelectionMedicaleChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of ParametreSelectionMedicale)) Implements Interfaces.IMoteur_Echeancier.SelectionMedicaleChanged
    Public Event SelectionMedicaleChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of ParametreSelectionMedicale)) Implements Interfaces.IMoteur_Echeancier.SelectionMedicaleChanging

    Public Property TableMaintienINCAPINVAL As Actuariat.ITableMaintienINCAPINVAL Implements Interfaces.IMoteur_Echeancier.TableMaintienINCAPINVAL
        Get
            Return m_MoteurEcheancierV2.Input.TableMaintienINCAPINVAL
        End Get
        Set(ByVal value As Actuariat.ITableMaintienINCAPINVAL)
            m_MoteurEcheancierV2.Input.TableMaintienINCAPINVAL = value
        End Set
    End Property
    Public Event TableMaintienINCAPINVALChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMaintienINCAPINVAL)) Implements Interfaces.IMoteur_Echeancier.TableMaintienINCAPINVALChanged
    Public Event TableMaintienINCAPINVALChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMaintienINCAPINVAL)) Implements Interfaces.IMoteur_Echeancier.TableMaintienINCAPINVALChanging

    Public Property TableMort As Actuariat.ITableMortalite Implements Interfaces.IMoteur_Echeancier.TableMort
        Get
            Return m_MoteurEcheancierV2.Input.TableMort
        End Get
        Set(ByVal value As Actuariat.ITableMortalite)
            m_MoteurEcheancierV2.Input.TableMort = value
        End Set
    End Property
    Public Event TableMortChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMortalite)) Implements Interfaces.IMoteur_Echeancier.TableMortChanged
    Public Event TableMortChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMortalite)) Implements Interfaces.IMoteur_Echeancier.TableMortChanging

    Public Property TarifDCMens As Double Implements Interfaces.IMoteur_Echeancier.TarifDCMens
        Get
            Return m_MoteurEcheancierV2.Input.TarifDCMens
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TarifDCMens = value
        End Set
    End Property
    Public Event TarifDCMensChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TarifDCMensChanged
    Public Event TarifDCMensChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TarifDCMensChanging

    Public Property TarifINCINVMens As Double Implements Interfaces.IMoteur_Echeancier.TarifINCINVMens
        Get
            Return m_MoteurEcheancierV2.Input.TarifINCINVMens
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TarifINCINVMens = value
        End Set
    End Property
    Public Event TarifINCINVMensChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TarifINCINVMensChanged
    Public Event TarifINCINVMensChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TarifINCINVMensChanging

    Public Property TxComPartenaire As Double Implements Interfaces.IMoteur_Echeancier.TxComPartenaire
        Get
            Return m_MoteurEcheancierV2.Input.TxComPartenaire
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxComPartenaire = value
        End Set
    End Property
    Public Event TxComPartenaireChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxComPartenaireChanged
    Public Event TxComPartenaireChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxComPartenaireChanging

    Public Property TxEntreeINCINV As Double Implements Interfaces.IMoteur_Echeancier.TxEntreeINCINV
        Get
            Return m_MoteurEcheancierV2.Input.TxEntreeINCINV
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxEntreeINCINV = value
        End Set
    End Property
    Public Event TxEntreeINCINVChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxEntreeINCINVChanged
    Public Event TxEntreeINCINVChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxEntreeINCINVChanging

    Public Property TxFG As Double Implements Interfaces.IMoteur_Echeancier.TxFG
        Get
            Return m_MoteurEcheancierV2.Input.TxFG
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxFG = value
        End Set
    End Property
    Public Event TxFGChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxFGChanged
    Public Event TxFGChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxFGChanging

    Public Property TxNomMens As Double Implements Interfaces.IMoteur_Echeancier.TxNomMens
        Get
            Return m_MoteurEcheancierV2.Input.TxNomMens
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxNomMens = value
        End Set
    End Property
    Public Event TxNomMensChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxNomMensChanged
    Public Event TxNomMensChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxNomMensChanging

    Public Property TxRembAntiMens As Double Implements Interfaces.IMoteur_Echeancier.TxRembAntiMens
        Get
            Return m_MoteurEcheancierV2.Input.TxRembAntiMens
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxRembAntiMens = value
        End Set
    End Property
    Public Event TxRembAntiMensChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxRembAntiMensChanged
    Public Event TxRembAntiMensChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxRembAntiMensChanging

    Public Property TxTaxeINCINV As Double Implements Interfaces.IMoteur_Echeancier.TxTaxeINCINV
        Get
            Return m_MoteurEcheancierV2.Input.TxTaxeINCINV
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxTaxeINCINV = value
        End Set
    End Property
    Public Event TxTaxeINCINVChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxTaxeINCINVChanged
    Public Event TxTaxeINCINVChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxTaxeINCINVChanging

    Public Property TxTechMens As Double Implements Interfaces.IMoteur_Echeancier.TxTechMens
        Get
            Return m_MoteurEcheancierV2.Input.TxTechMens
        End Get
        Set(ByVal value As Double)
            m_MoteurEcheancierV2.Input.TxTechMens = value
        End Set
    End Property
    Public Event TxTechMensChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxTechMensChanged
    Public Event TxTechMensChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements Interfaces.IMoteur_Echeancier.TxTechMensChanging
#End Region
    Private Sub Input_Changed(ByVal sender As Object, ByVal e As System.EventArgs)
        If m_Recalcul = TypeRecalcul.Automatique Then
            Me.calculScenarioCentral()
        Else
            SetEtatCalcul(PTIC_Util.ValueEtatCalcul.A_MAJ)
        End If
    End Sub
#End Region

#Region "Calculer"
    Public Sub calculScenarioCentral() Implements Interfaces.IMoteur_Echeancier.Calculer
        m_MoteurEcheancierV2.Calculer()
        m_Resultats = New AdapteResultatsEcheancier(m_MoteurEcheancierV2.Output)
        SetEtatCalcul(PTIC_Util.ValueEtatCalcul.A_JOUR)
        RaiseEvent moteurEcheancierAfterCalculer(Me, New EventArgs)
    End Sub
    Public Event moteurEcheancierAfterCalculer(ByVal sender As Object, ByVal e As System.EventArgs) Implements Interfaces.IMoteur_Echeancier.After_Calculer
#End Region

#Region "Etat du calcul"
    Private m_EtatCalcul As PTIC_Util.ValueEtatCalcul = ValueEtatCalcul.A_MAJ
    Public ReadOnly Property EtatCalcul As PTIC_Util.ValueEtatCalcul Implements Interfaces.IMoteur_Echeancier.EtatCalcul
        Get
            Return m_EtatCalcul
        End Get
    End Property
    Private Sub SetEtatCalcul(ByVal Value As PTIC_Util.ValueEtatCalcul)
        If m_EtatCalcul <> Value Then
            m_EtatCalcul = Value
            RaiseEvent EtatCalcul_Changed(Me, EventArgs.Empty)
        End If
    End Sub
    Public Event EtatCalcul_Changed As EventHandler Implements IMoteur_Echeancier.EtatCalcul_Changed
#End Region

#Region "Gestion des recalculs"
    Private m_Recalcul As PTIC_Util.TypeRecalcul = PTIC_Util.TypeRecalcul.SurOrdre
    Public Property Recalcul As PTIC_Util.TypeRecalcul Implements Interfaces.IMoteur_Echeancier.Recalcul
        Get
            Return m_Recalcul
        End Get
        Set(ByVal value As PTIC_Util.TypeRecalcul)
            If m_Recalcul <> value Then
                m_Recalcul = value
                If m_Recalcul = TypeRecalcul.Automatique Then
                    If m_EtatCalcul <> ValueEtatCalcul.A_JOUR Then
                        Me.calculScenarioCentral()
                    End If
                End If
            End If
        End Set
    End Property
#End Region

#Region "Outputs"
    Private m_Resultats As AdapteResultatsEcheancier
    Public ReadOnly Property Resultats As IResultatsEcheancier Implements Interfaces.IMoteur_Echeancier.Output
        Get
            Return m_Resultats
        End Get
    End Property
#End Region

End Class

Public Class AdapteResultatsEcheancier
    Implements IResultatsEcheancier

    Private m_IOutputMoteurEcheancier As IOutputMoteurEcheancier

    Public Sub New(ByVal IOutputMoteurEcheancier As IOutputMoteurEcheancier)
        m_IOutputMoteurEcheancier = IOutputMoteurEcheancier
    End Sub

    Public Sub clear() Implements Interfaces.IResultatsEcheancier.clear

    End Sub

    Public Property EcheanceMensuelle As Double Implements Interfaces.IResultatsEcheancier.EcheanceMensuelle
        Get
            Return m_IOutputMoteurEcheancier.EcheanceMensuelle
        End Get
        Set(ByVal value As Double)
        End Set
    End Property

    Public Property ProjectionAnnuelle As System.Data.DataTable Implements Interfaces.IResultatsEcheancier.ProjectionAnnuelle
        Get
            Return m_IOutputMoteurEcheancier.ProjectionAnnuelleDataTable
        End Get
        Set(ByVal value As System.Data.DataTable)
        End Set
    End Property

    Public Property ProjectionMensuelle As System.Data.DataTable Implements Interfaces.IResultatsEcheancier.ProjectionMensuelle
        Get
            Return m_IOutputMoteurEcheancier.ProjectionMensuelleDataTable
        End Get
        Set(ByVal value As System.Data.DataTable)
        End Set
    End Property
End Class
